<?php
// define array
$movies = array (
  0 => 'The Lion King',
  1 => 'Cars',
  2 => "A Bug's Life",
);
echo "<pre>";
var_export($movies);
// remove element from beginning of array
 array_shift($movies);
var_export($movies);
// remove element from end of array
array_pop($movies);
var_export($movies);
// add element to end of array
array_push($movies, 'sholay');
var_export($movies);

// add element to beginning of array
echo array_unshift($movies, 'The Incredibles');
var_export($movies);
